<?php
    header('Content-type:text/json');
    require "../../connection.php";
    try{
            $id = $_POST['id'];
            $option = array("id"=>$id);
            $result = $conn->where($option)->delete("admin");
            if($result){
                $msg = "删除成功";
            }else{
                $msg = "删除失败";
            }
            $data = array("status"=>"1","msg"=>$msg);
            echo json_encode($data);
    }catch(Exception $e){
        print_r($e->getMessage());
    }
?>